<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("sensor:sensorconfiguration:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sensor:sensorconfiguration:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sensor:sensorconfiguration:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
			<#if shiro.hasPermission("sensor:sensorconfiguration:info")>
            <a class="btn btn-primary" @click="details"><i class="fa fa-plus"></i>&nbsp;详情</a>
			</#if>
			<a class="btn btn-primary" @click="stopOrstart"><i class="fa fa-pencil-square-o"></i>&nbsp;启用/停用</a>
            
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
					<div class="form-group">
                        <div class="col-sm-2 control-label">名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead"  v-model="sensorConfiguration.sensorName" placeholder="传感器名称"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">生产厂家</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.sensorFactory" placeholder="生产厂家"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">串口号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.serialPort" placeholder="串口号"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">波特率</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.baudRate" placeholder="波特率"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">校验</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.crc" placeholder="校验"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">连接状态</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.connectionStatus" placeholder="连接状态"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">查询通讯地址数据</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.inquiryComAddress" placeholder="查询通讯地址数据"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">通讯地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.comAddress" placeholder="通讯地址"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">查询获取传感器数据</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" :disabled="isRead" v-model="sensorConfiguration.querySensor" placeholder="查询获取传感器数据"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">所在位置</div>
                        <div class="col-sm-10">
                            <!-- <input type="text" class="form-control" v-model="bMonitorCamera.live" placeholder="所在位置"/>-->
                            <select class="form-control" v-model="sensorConfiguration.locationId">
                                <option v-for="item in locationList" :value="item.id">{{item.name}}</option>
                            </select>
                        </div>
                    </div>
					
			<div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sensor/sensorconfiguration.js?_${.now?long}"></script>
</body>
</html>